#include<cstdio>
#include<cstring>
int main(){
	char a[200];
	gets(a);
	printf("%d\n",strlen(a));
	printf("%s\n",strlwr(a));
	printf("%s\n",strupr(a));
}
